<!-- 初始面板 -->
<template>
    <div class="home">
        <div class="dashboard-container" @click="toShow" v-if="isShowMask">
            <div class="dashboard-tips" v-if="isShowTips">
                <div class="btn" @click="toggleTips"></div>
            </div>
        </div>
    </div>
</template>

<script>
    import {
        mapGetters
    } from "vuex";
    export default {
        name: "home",
        computed: {
            ...mapGetters(["appState", "userState", "settingState"]),
        },
        created() {},

        data() {
            return {
                isShowTips: false,
                isShowMask: true
            };
        },
        computed: {
            cloudRender() {
                return this.$store.state.app.cloudRender
            }
        },
        mounted() {},
        methods: {
            // 展示tips
            toShow() {
                if (!this.cloudRender) {
                    this.$message({
                        message: '场景尚未初始化，请稍等...',
                        type: 'warning',
                        center: true
                    })
                    return
                }
                this.isShowTips = true
                // 显示log和气候控制面板和导航栏
                this.$store.commit('app/CHANGE_HOME', true)
                // 隐藏时间
                this.$store.commit('app/CHANGE_SHOWTIME', false)
            },
            // 隐藏tips和遮罩
            toggleTips() {
                this.isShowMask = false
            },
        },
    };
</script>

<style scoped>

</style>